ig.module('game.entities.card').requires('impact.entity').defines(function(){
    Card = ig.Entity.extend({
        size: {
            x: 107.3,
            y: 160
        },
        cardType: undefined,
        cardNr: undefined,
        animSheet: new ig.AnimationSheet('media/card.png', 107.3, 160),
        init: function(x, y, settings){
            this.parent(x, y, settings);
            
            this.addAnim('idle', 0, [54]);
        },
        update: function(){
        },
        draw: function(){
            this.parent();
        },
        setData: function(nr, type){
			
            this.cardNr = nr;
            this.cardType = type;
            
            var tmp = 0;
            switch (this.cardType) {
                case 1:
                    tmp = 0 + this.cardNr -1;
                    break;
                case 2:
                    tmp = 26 + this.cardNr -1;
                    break;
                case 3:
                    tmp = 13 + this.cardNr -1;
                    break;
                case 4:
                    tmp = 39 + this.cardNr -1;
                    break;
            }
            this.addAnim('open', 0.1, [tmp]);
			this.currentAnim = this.anims.open.rewind();
        }
    });
});
